package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.BTopical;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.request.TopicalRequest;
import com.ruoyi.system.domain.vo.BTopicalVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author yangxingze
* @description 针对表【b_topical(专题表)】的数据库操作Mapper
* @createDate 2024-10-11 23:30:56
* @Entity com.ruoyi.system.domain.BTopical
*/
public interface BTopicalMapper extends BaseMapper<BTopical> {

    /**
     * 分页获取主题列表
     * @param request
     * @return
     */
    List<BTopicalVo> queryList(@Param("query") TopicalRequest request);

    /**
     * 分页获取回复列表
     * @param topicalId
     * @return
     */
    List<BTopicalVo> selectReplyList(@Param("id") Long topicalId);

    /**
     * 删除主题
     * @param topicalIds 需要删除的主题ID
     * @return
     */
    public int deleteTopicalByIds(Long[] topicalIds);

    public int deleteTopicalByParentIds(Long[] parentIds);

    /**
     * 删除回复
     * @param replyIds 需要删除的回复ID
     * @return
     */
    public int deleteReplyByIds(Long[] replyIds);
}




